package com.siwei.mes.mapper.laboratory;

import com.siwei.mes.common.dataSource.DataSource;
import com.siwei.mes.common.dataSource.DataSourceNames;
import com.siwei.mes.entity.laboratory.*;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;


public interface WTSampleMapper {

    //新增样品表
    @DataSource(DataSourceNames.LABORATORY)
    public void insertWtSample(WtSample wtSample);

    //修改样品表
    @DataSource(DataSourceNames.LABORATORY)
    public void updateWtSample(WtSample wtSample);

    //修改样品表代表数量
    @DataSource(DataSourceNames.LABORATORY)
    public void updateWtSampleDelegateQuan(WtSample wtSample);


    //根据样品编号查询台账信息
    @DataSource(DataSourceNames.LABORATORY)
    public Map<String, Object> findWTSampleList(@Param("sampleId") String sampleId);

    //查询样品表当前年份最大值
    @DataSource(DataSourceNames.LABORATORY)
    public Map<String, Object> findWTSampleListMaxId(@Param("year") String year);

    //修改台账数据为已取样
    @DataSource(DataSourceNames.LABORATORY)
    void updateWTSampleList(@Param("sampleId")String sampleId,@Param("status")String status,@Param("sampleStatus")String sampleStatus,@Param("examResult")String examResult);

    //修改混凝土在检状态
    @DataSource(DataSourceNames.LABORATORY)
    void updateWTSample(@Param("sampleId")String sampleId,@Param("sampleStatus")String sampleStatus);


    //根据台账id查询台账信息
    @DataSource(DataSourceNames.LABORATORY)
    public Map<String, Object> findWTSampleAndWTConsign(@Param("consignId") String consignId);

    //根据委托时间段查询历史的协会抗渗 抗折台账
    @DataSource(DataSourceNames.LABORATORY)
    public List<WtSample> findWTSampleListByTime(@Param("beginDate") String beginDate, @Param("endDate") String endDate);

    @DataSource(DataSourceNames.LABORATORY)
    public List<WtSample> findWTSampleListByConsignIdAndSampleId(@Param("consignId") String consignId, @Param("sampleId") String sampleId);

    @DataSource(DataSourceNames.LABORATORY)
    String findImportIdWTSample(@Param("sampleId") String sampleId);
}
